package com.jyhs.maven.proxy.dynamic;

import net.sf.cglib.proxy.Enhancer;

import java.util.Calendar;

public class CglibProxyFactory {

    public static <T> T createProxy(T target) {
        Enhancer enhancer = new Enhancer();
        enhancer.setCallback(new CglibProxyInterceptor());
        enhancer.setSuperclass(target.getClass());
        return (T) enhancer.create();

    }

}
